BaseSubsystem.AddVariable 方法

新增一個使用者定義變數。

命名空間IntervalZero.KINGSTAR.Base.Class

組合: IntervalZero.KINGSTAR.Base.Class (於 IntervalZero.KINGSTAR.Base.dll) 版本:4.4.0.0

語法

C#VB
IUserVariable AddVariable(
       string Name,
       KsLogDataType Type,
       IUserVariable Parent = null,
       long FolderSize = 0
)
Function AddVariable(
       Name As String,
       Type As KsLogDataType,
       Parent = null As IUserVariable,
       FolderSize = 0 As Long
) As IUserVariable

參數

Name

型別:string

變數名稱。

 

Type

型別:KsLogDataType

變數的資料型別。

 

Parent

型別:IUserVariable

預設值:null

IUserVariable 的父資料夾,預設會將變數加到根資料夾中。

 

FolderSize

型別:long

預設值:0

新增 logDirectory 變數後,您可使用 FolderSize 設定資料夾大小。預設最多可新增 64 個 UserVariable。

回傳值

型別:IUserVariable

回傳一個使用者定義變數。

備註

可用的 EtherCAT 狀態

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

參見

BaseSubsystem 類別

IntervalZero.KINGSTAR.Base.Class 命名空間